<template>
  <view class="flex-col page">
    <view class="flex-col group">
      <view class="justify-between">
        <text class="text_1">基础版巡检（{{basisTotal}}次）</text>
        <text class="text_2">（{{conductNum}}/{{basisTotal}}）</text>
      </view>
      <view class="flex-col list" v-for="(item,index) in list" :key="index">
        <view class="flex-col list-item">
          <view class="flex-col group_2 view">
            <view class="flex-row">
              <image
                src="https://codefun-proj-user-res-1256085488.cos.ap-guangzhou.myqcloud.com/617a2ca7e4f1450011362b37/62b127f6d029820011531bae/16557836966004751365.png"
                class="image_1"
              />
              <text class="text_3">第{{item.num}}次巡检</text>
            </view>
            <text class="text_5">巡检工序：{{item.processName}}</text>
            <text class="text_7">巡检子项目：{{item.childProcessName}}</text>
            <text class="text_9">巡检时间：{{item.inspectionDate?item.inspectionDate:'------'}}</text>
          </view>
          <view class="justify-end group_4" v-if="item.status !='0'">
            <view class="flex-col items-center text-wrapper"><text class="text_11"  @click="go('/pages/index/check/checkdetail?id='+item.id)">查看详情</text></view>
            <view class="flex-col items-center text-wrapper_1" v-if="item.commentsLevel"><text class="text_13" >已评价</text></view>
			<view class="flex-col items-center text-wrapper_1 view_11" v-else><text class="text_13 text_26" @click="go('/pages/index/check/comment?id='+item.id)">评价</text></view>
		  </view>
        </view>
      </view>
    </view>
  </view>
</template>

<script>
  export default {
 
    data() {
      return {
		aboutId:{},
		basisTotal:0,
		conductNum:0,
		list:[]
	  };
    },
	onLoad(option) {
	this.aboutId = option
	console.log(this.aboutId);
	},
	created() {
		this.getData();		
	},
	props:{
	  
	},
    methods: {
		getData(){
			// 去查看按钮
			this.$http('inspectionFrequency.toview',this.aboutId).then(res=>{
				const {data} = res
				this.basisTotal = data[0].totalNums
				this.conductNum = data[0].conductNum
				this.list = data
			})
		}
	},
  };
</script>

<style scoped lang="scss">
	.flex-row {
		align-items: center;
	}
  .list-item {
    padding: 11px 12px 12px;
    background-color: #ffffff;
    border-radius: 8px;
  }
  .group_2 {
    padding: 11px 0 16.5px;
  }
  .group_4 {
    margin-top: 13.5px;
  }
  .text_5 {
    margin-top: 15.5px;
    align-self: flex-start;
    color: #333333;
    font-size: 13px;
    font-family: '.AppleSystemUIFont';
    line-height: 15px;
  }
  .text_7 {
    margin-top: 11.5px;
    align-self: flex-start;
    color: #333333;
    font-size: 13px;
    font-family: '.AppleSystemUIFont';
    line-height: 15px;
  }
  .text_9 {
    margin-top: 11.5px;
    align-self: flex-start;
    color: #333333;
    font-size: 13px;
    font-family: '.AppleSystemUIFont';
    line-height: 15px;
  }
  .text-wrapper {
	  justify-content: center;
    margin-right: 8px;
    padding: 5px 0 ;
    background-color: #f6f7f9;
    border-radius: 14px;
    width: 74px;
    // height: 28px;
  }
  .text-wrapper_1 {
	  justify-content: center;
    padding: 5px 0 ;
    background-color: #1d6aff14;
    border-radius: 14px;
    width: 74px;
    height: 28px;
  }
  .image_1 {
    // margin-top: 7px;
    border-radius: 50%;
    width: 8.5px;
    height: 8.5px;
  }
  .text_3 {
    margin-left: 6px;
    color: #333333;
    font-size: 14px;
    font-family: '.AppleSystemUIFont';
    line-height: 16.5px;
  }
  .text_11 {
    color: #333333;
    font-size: 12px;
    font-family: '.AppleSystemUIFont';
    line-height: 14px;
  }
  .text_13 {
    color: #1d6aff;
    font-size: 12px;
    font-family: '.AppleSystemUIFont';
    line-height: 14px;
  }
  .page {
    background-color: #f6f7f9ff;
    width: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    height: 100vh;
  }
  .group {
    padding: 15px 12px 12.5px;
    flex: 1 1 auto;
    overflow-y: auto;
  }
  .list {
    margin-top: 21px;
  }
  .text_1 {
    color: #333333;
    font-size: 16px;
    font-family: '.AppleSystemUIFont';
    line-height: 19px;
  }
  .text_2 {
    margin-right: 23.5px;
    margin-top: 2px;
    color: #1d6aff;
    font-size: 14px;
    font-family: '.AppleSystemUIFont';
    line-height: 16.5px;
  }
  .list-item:not(:first-of-type) {
    margin-top: 10px;
  }
  .section_3 {
    padding: 11px 12px 0;
  }
  .section_4 {
    padding: 0 12px 12px;
  }
  .view {
    padding: initial;
  }
  .view_4 {
    padding: initial;
  }
  .view_8 {
    padding: initial;
  }
  .view_9 {
    padding-bottom: 12px;
  }
  .view_13 {
    margin-top: initial;
    padding: 4.5px 0 9.5px;
    align-self: flex-end;
    background-color: #f6f7f9;
    border-radius: 14px;
    width: 74px;
  }
  .view_11 {
    padding: 5px 0;
    background-color: #1d6aff;
    height: 23px;
    // margin-bottom: 5px;
  }
  .text_30 {
    margin-top: 11.5px;
  }
  .text_31 {
    margin-right: initial;
    padding: initial;
    background-color: initial;
    border-radius: initial;
    width: initial;
    height: initial;
    color: #333333;
    font-size: 12px;
    font-family: '.AppleSystemUIFont';
    line-height: 14px;
  }
  .text_26 {
    color: #f6f7f9;
  }
</style>